
function focusFunction () {
  const parentNode = this.parentNode.parentNode
  parentNode.classList.add('focus')
}
function blurFunction () {
  const parentNode = this.parentNode.parentNode
  if (this.value === '') {
    parentNode.classList.remove('focus')
  }
}

function myfun () {
  const inputs = document.querySelectorAll('.input')
  inputs.forEach(input => {
    input.addEventListener('focus', focusFunction)
    input.addEventListener('blur', blurFunction)
  })
}

export { // 很关键
  myfun
}
